#include "symbol.h"
#include "table.h"

Symbol::Symbol(SymbolType t , Domain d)
: _type(t)
, _domain(d)
{

}

void 
Symbol::name(std::string const &n)
{
	_value = StringTable::instance()->replace(n);
}
std::string 
Symbol::name()const
{
	std::string n;
	StringTable::instance()->get(_value,n);
	return n;
}

void 
Symbol::push_attr(Symbol* s)
{
	_attribute.push_back(s);	
}

void 
Symbol::push_attr(AttrList &l)
{
	for(size_t i=0 ; i<l.size() ; ++i)
		_attribute.push_back(l[i]);	
}